import json, datetime
from django.shortcuts import render
from django.template import loader, Context, RequestContext
from django.contrib import auth
from django.views.decorators.csrf import csrf_protect, csrf_exempt
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
import urllib, traceback
# Create your views here.


@csrf_exempt
def createword(request):
    response_data = {}
    response_data['issuc'] = True
    try:
        context = request.POST.get('context',None)
        response_data['msg'] = u'访问成功'
    except Exception as e:
        response_data['issuc'] = False
        response_data['msg'] = '%s' % e

    return HttpResponse(json.dumps(response_data), content_type="application/json")